-
Notifications
You must be signed in to change notification settings - Fork 425
Feat/simplify upsert #1947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/simplify upsert #1947
Conversation
| assert [snap.summary.operation for snap in tbl.snapshots() if snap.summary is not None] == expected_operations | ||
|
|
||
| # This should be a no-op | ||
| # This will update all 3 rows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is very nice to update rows that should not be updated 🤔 If nothing changes, we should just skip over it.
| # with pytest.raises(ValueError, match="Target table has duplicate rows, aborting upsert"): | ||
| # _ = tbl.upsert(df) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to let this test pass pretty easily:
| if has_duplicate_rows(target_table, join_cols): |
No description provided.